package com.biostime.springdraw.modules.sd.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.biostime.springdraw.modules.sd.entity.Shareaward;
import com.biostime.springdraw.common.service.CrudService;
import com.biostime.springdraw.modules.sd.dao.ShareawardDao;
import com.biostime.springdraw.modules.sd.dto.DistributedAwardDto;
/**
 * 分享奖品表Service
 * @author chenweicheng
 * @version 2016-05-03
 */
@Service
@Transactional
public class ShareawardService extends CrudService<ShareawardDao, Shareaward> {
	public List<HashMap<String,Object>> getShareAwards(String shareId){
		return dao.getShareAwards(shareId);
	}
	
	public void touchAward(String awardId,String shareId){
		dao.touchAward(awardId, shareId); 
	}
	
	public Shareaward getAward(String awardId,String shareId){
		return dao.getAward(awardId, shareId); 
	}	
	
	public int recoveryAward(){
		return dao.recoveryAward();
	}
	
	public List<DistributedAwardDto> shareExitsAwards(String code){
		return dao.shareExitsAwards(code);
	}
	
	public int shareExitsOneAward(String code,String awardId){
		return dao.shareExitsOneAward(code, awardId);
	}
}
